<!--Descriptive page name, messages and instructions-->
<h2>
<% if @user.identity_url %>
  <%= ts("Change My OpenID") %>
<% else %>
  <%= ts("Add An OpenID") %>
<% end %>
</h2>
<%= error_messages_for :user %>
<!--/descriptions-->

<!--subnav-->
<ul class="navigation" role="navigation">
  <li><%= link_to ts("Edit default pseud and icon"), [:edit, @user, @user.default_pseud] %></li>
  <li><%= link_to ts("Change My User Name"), change_username_user_path(@user) %></li>
  <li>
  <% if @user.crypted_password %>
    <%= link_to ts("Change My Password"), change_password_user_path(@user) %>
  <% else %>
    <%= link_to ts("Add a Password"), change_password_user_path(@user) %>
  <% end %>
  </li>
</ul>
<!--/subnav-->

<!--main content-->
<% if ArchiveConfig.USE_OPENID %>	
  <% if @user.crypted_password %>
    <%= form_tag change_openid_user_path(@user) do %>
      <dl>
        <dt><%= label_tag :password_check, ts("Current password") %></dt>
        <dd><%= password_field_tag :password_check%></dd>

        <dt><%= label_tag :identity_url, "New OpenID URL" %></dt>
        <dd><%= text_field_tag :identity_url, @openid_url, :size => 50 %></dd>
      </dl>
      <p class="submit">
      <% if @user.identity_url %>
        <%= submit_tag "Change OpenID" %>
      <% else %>
        <%= submit_tag "Add OpenID" %>
      <% end %>
      </p>
    <% end %>
  <% else %>
    <p><%= ts("For security reasons, you must re-validate with a password in order to change your OpenID. Please follow the link above to add a password to your account.") %>
  <% end %>
  <% if @wrong_password %>
  <div class="clear"></div>
    <p class="footnote">
      <%= ts("If you've forgotten your password, we can send you a temporary one.") %>
    <p>
    <%= form_tag passwords_path do %>
      <%= hidden_field_tag 'login', @user.login %>
      <p class="footnote">
        <%= submit_tag ts('Reset my password', :class => 'submit') %>
      <p>
    <% end %>
  <% end %>
<% else %>
  <p><%= ts("Sorry, we're not currently allowing Open ID") %></p>
<% end %>
<hr class="clear" />
<!--/content-->
